﻿<UserControl
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
	xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
	mc:Ignorable="d"
	xmlns:local="clr-namespace:FruitWeigher"
	x:Class="FruitWeigher.UISelected"
	d:DesignWidth="458" d:DesignHeight="85">

	<UserControl.Resources>
		<Style x:Key="ButtonStyle1" TargetType="Button">
			<Setter Property="Template">
				<Setter.Value>
					<ControlTemplate TargetType="Button">
						<Grid>
							<VisualStateManager.VisualStateGroups>
								<VisualStateGroup x:Name="FocusStates">
									<VisualState x:Name="Focused"/>
									<VisualState x:Name="Unfocused"/>
								</VisualStateGroup>
								<VisualStateGroup x:Name="CommonStates">
									<VisualState x:Name="Normal"/>
									<VisualState x:Name="MouseOver">
										<Storyboard>
											<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="contentPresenter" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)">
												<EasingDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
												<EasingDoubleKeyFrame KeyTime="00:00:00.3000000" Value="1.1"/>
											</DoubleAnimationUsingKeyFrames>
											<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="contentPresenter" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)">
												<EasingDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
												<EasingDoubleKeyFrame KeyTime="00:00:00.3000000" Value="1.1"/>
											</DoubleAnimationUsingKeyFrames>
											<ColorAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="rectangle" Storyboard.TargetProperty="(Shape.Stroke).(SolidColorBrush.Color)">
												<EasingColorKeyFrame KeyTime="00:00:00" Value="Red"/>
											</ColorAnimationUsingKeyFrames>
										</Storyboard>
									</VisualState>
									<VisualState x:Name="Pressed">
										<Storyboard>
											<ColorAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="rectangle" Storyboard.TargetProperty="(Shape.Stroke).(SolidColorBrush.Color)">
												<EasingColorKeyFrame KeyTime="00:00:00" Value="Black"/>
											</ColorAnimationUsingKeyFrames>
											<ColorAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="rectangle" Storyboard.TargetProperty="(Shape.Fill).(SolidColorBrush.Color)">
												<EasingColorKeyFrame KeyTime="00:00:00" Value="Red"/>
											</ColorAnimationUsingKeyFrames>
										</Storyboard>
									</VisualState>
									<VisualState x:Name="Disabled"/>
								</VisualStateGroup>
							</VisualStateManager.VisualStateGroups>
							<Rectangle x:Name="rectangle" Fill="White" Stroke="Black" StrokeThickness="3" RadiusX="6" RadiusY="6"/>
							<ContentPresenter x:Name="contentPresenter" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="0,-12,0,0" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" RenderTransformOrigin="0.5,0.5">
								<ContentPresenter.RenderTransform>
									<TransformGroup>
										<ScaleTransform/>
										<SkewTransform/>
										<RotateTransform/>
										<TranslateTransform/>
									</TransformGroup>
								</ContentPresenter.RenderTransform>
							</ContentPresenter>
						</Grid>
					</ControlTemplate>
				</Setter.Value>
			</Setter>
		</Style>
	</UserControl.Resources>

	<Grid x:Name="LayoutRoot">
		<StackPanel>
			<StackPanel x:Name="ItemList" Height="85" HorizontalAlignment="Center" VerticalAlignment="Center" Orientation="Horizontal">
				<Button x:Name="B1" Height="85" HorizontalAlignment="Center" Margin="0,0,14,0" Style="{StaticResource ButtonStyle1}" Width="76">
					<local:UIItem0/>
				</Button>
				<Button x:Name="B2" Height="85" HorizontalAlignment="Center" Style="{StaticResource ButtonStyle1}" Width="76" Margin="0,0,14,0">
					<local:UIItem0 d:LayoutOverrides="Width, Height" />
				</Button>
				<Button x:Name="B3" Height="85" HorizontalAlignment="Center" Style="{StaticResource ButtonStyle1}" Width="76" Margin="0,0,14,0">
					<local:UIItem0 d:LayoutOverrides="Width, Height" />
				</Button>
				<Button x:Name="B4" Height="85" HorizontalAlignment="Center" Style="{StaticResource ButtonStyle1}" Width="76" Margin="0,0,14,0">
					<local:UIItem0 d:LayoutOverrides="Width, Height" />
				</Button>
				<Button x:Name="B5" Height="85" HorizontalAlignment="Center" Style="{StaticResource ButtonStyle1}" Width="76" Margin="0,0,14,0">
					<local:UIItem0 d:LayoutOverrides="Width, Height" />
				</Button>
			</StackPanel>
		</StackPanel>
	</Grid>
</UserControl>